<?php
class tagscollection extends daocollection implements daocollectioninterface
{	
	public function __construct(dao $currenttag)
	{
		$this->currenttag = $currenttag;
	}
	
	public function getwithdata()
	{
		$connection = db::factory('mysql');
		
		$sql = "SELECT * FROM Tags order by `count` DESC";
		
		$results = $connection->getArray($sql);
		
		$this->populate($results, 'tag');
	}
}